﻿<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                              xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
    <xsl:template match="searchengines">
        <menupopup>
            <xsl:apply-templates select="searchengine" />
        </menupopup>
    </xsl:template>
    <xsl:template match="searchengine">
        <xsl:element name="menuitem">
            <xsl:attribute name="id">vingradmenu-tb-searchengine-<xsl:value-of select="@id" /></xsl:attribute>
            <xsl:attribute name="label">
                <xsl:value-of select="@name" />
            </xsl:attribute> 
            <xsl:attribute name="class">menuitem-iconic</xsl:attribute>   
            <xsl:attribute name="style">list-style-image: url('chrome://vingradmenu/skin/searchengines/<xsl:value-of select="@icon" />')</xsl:attribute>
            <xsl:attribute name="oncommand">searchManager.selectSE("<xsl:value-of select="@id" />");</xsl:attribute>
        </xsl:element>
    </xsl:template>
</xsl:stylesheet>
